﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<DVSProject.Models.AccessModels>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    FEEDER
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <script type="text/javascript">
        $(function () {


            //
            $("#FeederStandardI").attr('maxlength', '3');
            $("#FeederActualI").attr('maxlength', '3');
            $('#FeederStandardI').bind('keypress', function (e) {
                return (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57) && e.which != 46) ? false : true;
            })
            $('#FeederActualI').bind('keypress', function (e) {
                return (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57) && e.which != 46) ? false : true;
            })

            $('#FeederStandardI').change(function () {
                if ($('#FeederStandardI').val() == $('#FeederActualI').val()) {
                    $('#FeederPointI').val('1');
                } else {
                    $('#FeederPointI').val('0');
                }
            });

            $('#FeederActualI').change(function () {
                if ($('#FeederStandardI').val() == $('#FeederActualI').val()) {
                    $('#FeederPointI').val('1');
                } else {
                    $('#FeederPointI').val('0');
                }
            });
            //
            $("#FeederStandardII").attr('maxlength', '3');
            $("#FeederActualII").attr('maxlength', '3');
            $('#FeederStandardII').bind('keypress', function (e) {
                return (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57) && e.which != 46) ? false : true;
            })
            $('#FeederActualII').bind('keypress', function (e) {
                return (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57) && e.which != 46) ? false : true;
            })
            $('#FeederStandardII').change(function () {
                if ($('#FeederStandardII').val() == $('#FeederActualII').val()) {
                    $('#FeederPointII').val('1');
                } else {
                    $('#FeederPointII').val('0');
                }
            });

            $('#FeederActualII').change(function () {
                if ($('#FeederStandardII').val() == $('#FeederActualII').val()) {
                    $('#FeederPointII').val('1');
                } else {
                    $('#FeederPointII').val('0');
                }
            });
            //
            $("#FeederStandardIII").attr('maxlength', '3');
            $("#FeederActualIII").attr('maxlength', '3');
            $('#FeederStandardIII').bind('keypress', function (e) {
                return (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57) && e.which != 46) ? false : true;
            })
            $('#FeederActualIII').bind('keypress', function (e) {
                return (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57) && e.which != 46) ? false : true;
            })
            $('#FeederStandardIII').change(function () {
                if ($('#FeederStandardIII').val() == $('#FeederActualIII').val()) {
                    $('#FeederPointIII').val('1');
                } else {
                    $('#FeederPointIII').val('0');
                }
            });

            $('#FeederActualIII').change(function () {
                if ($('#FeederStandardIII').val() == $('#FeederActualIII').val()) {
                    $('#FeederPointIII').val('1');
                } else {
                    $('#FeederPointIII').val('0');
                }
            });
            //
            $("#FeederStandardIV").attr('maxlength', '3');
            $("#FeederActualIV").attr('maxlength', '3');
            $('#FeederStandardIV').bind('keypress', function (e) {
                return (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57) && e.which != 46) ? false : true;
            })
            $('#FeederActualIV').bind('keypress', function (e) {
                return (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57) && e.which != 46) ? false : true;
            })
            $('#FeederStandardIV').change(function () {
                if ($('#FeederStandardIV').val() == $('#FeederActualIV').val()) {
                    $('#FeederPointIV').val('1');
                } else {
                    $('#FeederPointIV').val('0');
                }
            });

            $('#FeederActualIV').change(function () {
                if ($('#FeederStandardIV').val() == $('#FeederActualIV').val()) {
                    $('#FeederPointIV').val('1');
                } else {
                    $('#FeederPointIV').val('0');
                }
            });
            //
            $("#FeederStandardV").attr('maxlength', '3');
            $("#FeederActualV").attr('maxlength', '3');
            $('#FeederStandardV').bind('keypress', function (e) {
                return (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57) && e.which != 46) ? false : true;
            })
            $('#FeederActualV').bind('keypress', function (e) {
                return (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57) && e.which != 46) ? false : true;
            })
            $('#FeederStandardV').change(function () {
                if ($('#FeederStandardV').val() == $('#FeederActualV').val()) {
                    $('#FeederPointV').val('1');
                } else {
                    $('#FeederPointV').val('0');
                }
            });

            $('#FeederActualV').change(function () {
                if ($('#FeederStandardV').val() == $('#FeederActualV').val()) {
                    $('#FeederPointV').val('1');
                } else {
                    $('#FeederPointV').val('0');
                }
            });
            //
            $("#FeederStandardVI").attr('maxlength', '3');
            $("#FeederActualVI").attr('maxlength', '3');
            $('#FeederStandardVI').bind('keypress', function (e) {
                return (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57) && e.which != 46) ? false : true;
            })
            $('#FeederActualVI').bind('keypress', function (e) {
                return (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57) && e.which != 46) ? false : true;
            })
            $('#FeederStandardVI').change(function () {
                if ($('#FeederStandardVI').val() == $('#FeederActualVI').val()) {
                    $('#FeederPointVI').val('1');
                } else {
                    $('#FeederPointVI').val('0');
                }
            });

            $('#FeederActualVI').change(function () {
                if ($('#FeederStandardVI').val() == $('#FeederActualVI').val()) {
                    $('#FeederPointVI').val('1');
                } else {
                    $('#FeederPointVI').val('0');
                }
            });
            //
            $("#FeederStandardVII").attr('maxlength', '3');
            $("#FeederActualVII").attr('maxlength', '3');
            $('#FeederStandardVII').bind('keypress', function (e) {
                return (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57) && e.which != 46) ? false : true;
            })
            $('#FeederActualVII').bind('keypress', function (e) {
                return (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57) && e.which != 46) ? false : true;
            })
            $('#FeederStandardVII').change(function () {
                if ($('#FeederStandardVII').val() == $('#FeederActualVII').val()) {
                    $('#FeederPointVII').val('1');
                } else {
                    $('#FeederPointVII').val('0');
                }
            });

            $('#FeederActualVII').change(function () {
                if ($('#FeederStandardVII').val() == $('#FeederActualVII').val()) {
                    $('#FeederPointVII').val('1');
                } else {
                    $('#FeederPointVII').val('0');
                }
            });
            //
            $("#FeederStandardVIII").attr('maxlength', '3');
            $("#FeederActualVIII").attr('maxlength', '3');
            $('#FeederStandardVIII').bind('keypress', function (e) {
                return (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57) && e.which != 46) ? false : true;
            })
            $('#FeederActualVIII').bind('keypress', function (e) {
                return (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57) && e.which != 46) ? false : true;
            })
            $('#FeederStandardVIII').change(function () {
                if ($('#FeederStandardVIII').val() == $('#FeederActualVIII').val()) {
                    $('#FeederPointVIII').val('1');
                } else {
                    $('#FeederPointVIII').val('0');
                }
            });

            $('#FeederActualVIII').change(function () {
                if ($('#FeederStandardVIII').val() == $('#FeederActualVIII').val()) {
                    $('#FeederPointVIII').val('1');
                } else {
                    $('#FeederPointVIII').val('0');
                }
            });
            //
            $("#FeederStandardIX").attr('maxlength', '3');
            $("#FeederActualIX").attr('maxlength', '3');
            $('#FeederStandardIX').bind('keypress', function (e) {
                return (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57) && e.which != 46) ? false : true;
            })
            $('#FeederActualIX').bind('keypress', function (e) {
                return (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57) && e.which != 46) ? false : true;
            })
            $('#FeederStandardIX').change(function () {
                if ($('#FeederStandardIX').val() == $('#FeederActualIX').val()) {
                    $('#FeederPointIX').val('1');
                } else {
                    $('#FeederPointIX').val('0');
                }
            });

            $('#FeederActualIX').change(function () {
                if ($('#FeederStandardIX').val() == $('#FeederActualIX').val()) {
                    $('#FeederPointIX').val('1');
                } else {
                    $('#FeederPointIX').val('0');
                }
            });
            //
            $("#FeederStandardX").attr('maxlength', '3');
            $("#FeederActualX").attr('maxlength', '3');
            $('#FeederStandardX').bind('keypress', function (e) {
                return (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57) && e.which != 46) ? false : true;
            })
            $('#FeederActualX').bind('keypress', function (e) {
                return (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57) && e.which != 46) ? false : true;
            })
            $('#FeederStandardX').change(function () {
                if ($('#FeederStandardX').val() == $('#FeederActualX').val()) {
                    $('#FeederPointX').val('1');
                } else {
                    $('#FeederPointX').val('0');
                }
            });

            $('#FeederActualX').change(function () {
                if ($('#FeederStandardX').val() == $('#FeederActualX').val()) {
                    $('#FeederPointX').val('1');
                } else {
                    $('#FeederPointX').val('0');
                }
            });
            //
            $("#FeederStandardXI").attr('maxlength', '3');
            $("#FeederActualXI").attr('maxlength', '3');
            $('#FeederStandardXI').bind('keypress', function (e) {
                return (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57) && e.which != 46) ? false : true;
            })
            $('#FeederActualXI').bind('keypress', function (e) {
                return (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57) && e.which != 46) ? false : true;
            })
            $('#FeederStandardXI').change(function () {
                if ($('#FeederStandardXI').val() == $('#FeederActualXI').val()) {
                    $('#FeederPointXI').val('1');
                } else {
                    $('#FeederPointXI').val('0');
                }
            });

            $('#FeederActualXI').change(function () {
                if ($('#FeederStandardXI').val() == $('#FeederActualXI').val()) {
                    $('#FeederPointXI').val('1');
                } else {
                    $('#FeederPointXI').val('0');
                }
            });
            //
            $("#FeederStandardXII").attr('maxlength', '3');
            $("#FeederActualXII").attr('maxlength', '3');
            $('#FeederStandardXII').bind('keypress', function (e) {
                return (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57) && e.which != 46) ? false : true;
            })
            $('#FeederActualXII').bind('keypress', function (e) {
                return (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57) && e.which != 46) ? false : true;
            })
            $('#FeederStandardXII').change(function () {
                if ($('#FeederStandardXII').val() == $('#FeederActualXII').val()) {
                    $('#FeederPointXII').val('1');
                } else {
                    $('#FeederPointXII').val('0');
                }
            });

            $('#FeederActualXII').change(function () {
                if ($('#FeederStandardXII').val() == $('#FeederActualXII').val()) {
                    $('#FeederPointXII').val('1');
                } else {
                    $('#FeederPointXII').val('0');
                }
            });
            //
            $("#FeederStandardXIII").attr('maxlength', '3');
            $("#FeederActualXIII").attr('maxlength', '3');
            $('#FeederStandardXIII').bind('keypress', function (e) {
                return (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57) && e.which != 46) ? false : true;
            })
            $('#FeederActualXIII').bind('keypress', function (e) {
                return (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57) && e.which != 46) ? false : true;
            })
            $('#FeederStandardXIII').change(function () {
                if ($('#FeederStandardXIII').val() == $('#FeederActualXIII').val()) {
                    $('#FeederPointXIII').val('1');
                } else {
                    $('#FeederPointXIII').val('0');
                }
            });

            $('#FeederActualXIII').change(function () {
                if ($('#FeederStandardXIII').val() == $('#FeederActualXIII').val()) {
                    $('#FeederPointXIII').val('1');
                } else {
                    $('#FeederPointXIII').val('0');
                }
            });

            

            TotalPoint();

            function TotalPoint() {
                $("#TotalPoint").val(parseInt($('#FeederPointI').val()) + parseInt($('#FeederPointII').val()) +
                 parseInt($('#FeederPointIII').val()) + parseInt($('#FeederPointIV').val()) +
                  parseInt($('#FeederPointV').val()) + parseInt($('#FeederPointVI').val()) +
                    parseInt($('#FeederPointVII').val()) + parseInt($('#FeederPointVIII').val()) +
                      parseInt($('#FeederPointIX').val()) + parseInt($('#FeederPointX').val()) +
                        parseInt($('#FeederPointXI').val()) + parseInt($('#FeederPointXII').val()) + parseInt($('#FeederPointXIII').val()));

            }

        });
    </script>
    <h2>
        Dispenser เครื่องจ่ายน้ำยา</h2>
    <% using (Html.BeginForm())
       {%>
    <%= Html.ValidationSummary(true) %>
    <div class="CSSTableGenerator">
        <table>
            <tr>
                <th>
                    <label>
                        Type of Feeder</label>
                </th>
                <th>
                    <label>
                        Product</label>
                </th>
                <th align="center" colspan="3">
                    <label>
                        Dilution</label>
                </th>
                <th>
                    <label>
                        Point คะแนน</label>
                </th>
            </tr>
            <tr>
                <th>
                </th>
                <th>
                </th>
                <th colspan="2">
                    <label>
                        Standard</label>
                </th>
                <th>
                    <label>
                        Actual</label>
                </th>
                <th>
                </th>
            </tr>
            <tr>
                <td>
                    <label>
                        QFM High Flow</label>
                </td>
                <td>
                    <%=@Html.DropDownListFor(model => model.FeederRemarksI, Model.FeederRemarkISelect)%>
                </td>
                <td>
                    <label>
                        1 :</label>
                </td>
                <td>
                    <%= Html.TextBoxFor(model => model.FeederStandardI, new { @class = "textbox"  })%>
                </td>
                <td>
                    <%= Html.TextBoxFor(model => model.FeederActualI, new { @class = "textbox" })%>
                </td>
                <td align="center">
                    <%=@Html.TextBoxFor(model => model.FeederPointI, new { @Value = "1", @readonly = "true" })%>
                </td>
            </tr>
            <tr>
                <td>
                    <label>
                        QFM High Flow</label>
                </td>
                <td>
                    <%=@Html.DropDownListFor(model => model.FeederRemarksII, Model.FeederRemarkIISelect)%>
                </td>
                <td>
                    <label>
                        1 :</label>
                </td>
                <td>
                    <%= Html.TextBoxFor(model => model.FeederStandardII, new { @class = "textbox" })%>
                </td>
                <td>
                    <%= Html.TextBoxFor(model => model.FeederActualII, new { @class = "textbox" })%>
                </td>
                <td align="center">
                    <%=@Html.TextBoxFor(model => model.FeederPointII, new { @Value = "1", @readonly = "true" })%>
                </td>
            </tr>
            <tr>
                <td>
                    <label>
                        QFM Low Flow</label>
                </td>
                <td>
                    <%=@Html.DropDownListFor(model => model.FeederRemarksIII, Model.FeederRemarkIIISelect)%>
                </td>
                <td>
                    <label>
                        1 :</label>
                </td>
                <td>
                    <%= Html.TextBoxFor(model => model.FeederStandardIII, new { @class = "textbox" })%>
                </td>
                <td>
                    <%= Html.TextBoxFor(model => model.FeederActualIII, new { @class = "textbox" })%>
                </td>
                <td align="center">
                    <%=@Html.TextBoxFor(model => model.FeederPointIII, new { @Value = "1", @readonly = "true" })%>
                </td>
            </tr>
            <tr>
                <td>
                    <label>
                        QFM Low Flow</label>
                </td>
                <td>
                    <%=@Html.DropDownListFor(model => model.FeederRemarksIV, Model.FeederRemarkIVSelect)%>
                </td>
                <td>
                    <label>
                        1 :</label>
                </td>
                <td>
                    <%= Html.TextBoxFor(model => model.FeederStandardIV, new { @class = "textbox" })%>
                </td>
                <td>
                    <%= Html.TextBoxFor(model => model.FeederActualIV, new { @class = "textbox" })%>
                </td>
                <td align="center">
                    <%=@Html.TextBoxFor(model => model.FeederPointIV, new { @Value = "1", @readonly = "true" })%>
                </td>
            </tr>
            <tr>
                <td>
                    <label>
                        J-FILL</label>
                </td>
                <td>
                    <%=@Html.DropDownListFor(model => model.FeederRemarksV, Model.FeederRemarkVSelect)%>
                </td>
                <td>
                    <label>
                        1 :</label>
                </td>
                <td>
                    <%= Html.TextBoxFor(model => model.FeederStandardV, new { @class = "textbox",@Value=750 })%>
                </td>
                <td>
                    <%= Html.TextBoxFor(model => model.FeederActualV, new { @class = "textbox",@Value=750})%>
                </td>
                <td align="center">
                    <%=@Html.TextBoxFor(model => model.FeederPointV, new { @Value = "1", @readonly = "true" })%>
                </td>
            </tr>
            <tr>
                <td>
                    <label>
                        J-FILL</label>
                </td>
                <td>
                    <%=@Html.DropDownListFor(model => model.FeederRemarksVI, Model.FeederRemarkVISelect)%>
                </td>
                <td>
                    <label>
                        1 :</label>
                </td>
                <td>
                    <%= Html.TextBoxFor(model => model.FeederStandardVI, new { @class = "textbox", @Value = 40 })%>
                </td>
                <td>
                    <%= Html.TextBoxFor(model => model.FeederActualVI, new { @class = "textbox",@Value=40 })%>
                </td>
                <td align="center">
                    <%=@Html.TextBoxFor(model => model.FeederPointVI, new { @Value = "1", @readonly = "true" })%>
                </td>
            </tr>
            <tr>
                <td>
                    <label>
                        J-FILL</label>
                </td>
                <td>
                    <%=@Html.DropDownListFor(model => model.FeederRemarksVII, Model.FeederRemarkVIISelect)%>
                </td>
                <td>
                    <label>
                        1 :</label>
                </td>
                <td>
                    <%= Html.TextBoxFor(model => model.FeederStandardVII, new { @class = "textbox",@Value=256 })%>
                </td>
                <td>
                    <%= Html.TextBoxFor(model => model.FeederActualVII, new { @class = "textbox",@Value=256 })%>
                </td>
                <td align="center">
                    <%=@Html.TextBoxFor(model => model.FeederPointVII, new { @Value = "1", @readonly = "true" })%>
                </td>
            </tr>
            <tr>
                <td>
                    <label>
                        J-FILL</label>
                </td>
                <td>
                    <%=@Html.DropDownListFor(model => model.FeederRemarksVIII, Model.FeederRemarkVIIISelect)%>
                </td>
                <td>
                    <label>
                        1 :</label>
                </td>
                <td>
                    <%= Html.TextBoxFor(model => model.FeederStandardVIII, new { @class = "textbox" ,@Value=512})%>
                </td>
                <td>
                    <%= Html.TextBoxFor(model => model.FeederActualVIII, new { @class = "textbox",@Value=512 })%>
                </td>
                <td align="center">
                    <%=@Html.TextBoxFor(model => model.FeederPointVIII, new { @Value = "1", @readonly = "true" })%>
                </td>
            </tr>
            <tr>
                <td>
                    <label>
                        Pelican Pump เพอริแกน ปั้ม
                    </label>
                </td>
                <td>
                    <%=@Html.DropDownListFor(model => model.FeederRemarksIX, Model.FeederRemarkIXSelect)%>
                </td>
                <td>
                    <label>
                        1 :</label>
                </td>
                <td>
                    <%= Html.TextBoxFor(model => model.FeederStandardIX, new { @class = "textbox" })%>
                </td>
                <td>
                    <%= Html.TextBoxFor(model => model.FeederActualIX, new { @class = "textbox" })%>
                </td>
                <td align="center">
                    <%=@Html.TextBoxFor(model => model.FeederPointIX, new { @Value = "1", @readonly = "true" })%>
                </td>
            </tr>
            <tr>
                <td>
                    <label>
                        Pelican Pump เพอริแกน ปั้ม
                    </label>
                </td>
                <td>
                    <%=@Html.DropDownListFor(model => model.FeederRemarksX, Model.FeederRemarkXSelect)%>
                </td>
                <td>
                    <label>
                        1 :</label>
                </td>
                <td>
                    <%= Html.TextBoxFor(model => model.FeederStandardX, new { @class = "textbox" })%>
                </td>
                <td>
                    <%= Html.TextBoxFor(model => model.FeederActualX, new { @class = "textbox" })%>
                </td>
                <td align="center">
                    <%=@Html.TextBoxFor(model => model.FeederPointX, new { @Value = "1", @readonly = "true" })%>
                </td>
            </tr>
            <tr>
                <td>
                    <label>
                        Pelican Pump เพอริแกน ปั้ม
                    </label>
                </td>
                <td>
                    <%=@Html.DropDownListFor(model => model.FeederRemarksXI, Model.FeederRemarkXISelect)%>
                </td>
                <td>
                    <label>
                        1 :</label>
                </td>
                <td>
                    <%= Html.TextBoxFor(model => model.FeederStandardXI, new { @class = "textbox" })%>
                </td>
                <td>
                    <%= Html.TextBoxFor(model => model.FeederActualXI, new { @class = "textbox" })%>
                </td>
                <td align="center">
                    <%=@Html.TextBoxFor(model => model.FeederPointXI, new { @Value = "1", @readonly = "true" })%>
                </td>
            </tr>
            <tr>
                <td>
                    <label>
                        Pelican Pump เพอริแกน ปั้ม
                    </label>
                </td>
                <td>
                    <%=@Html.DropDownListFor(model => model.FeederRemarksXII, Model.FeederRemarkXIISelect)%>
                </td>
                <td>
                    <label>
                        1 :</label>
                </td>
                <td>
                    <%= Html.TextBoxFor(model => model.FeederStandardXII, new { @class = "textbox" })%>
                </td>
                <td>
                    <%= Html.TextBoxFor(model => model.FeederActualXII, new { @class = "textbox" })%>
                </td>
                <td align="center">
                    <%=@Html.TextBoxFor(model => model.FeederPointXII, new { @Value = "1", @readonly = "true" })%>
                </td>
            </tr>
            <tr>
                <td>
                    <label>
                        Pelican Pump เพอริแกน ปั้ม
                    </label>
                </td>
                <td>
                    <%=@Html.DropDownListFor(model => model.FeederRemarksXIII, Model.FeederRemarkXIIISelect)%>
                </td>
                <td>
                    <label>
                        1 :</label>
                </td>
                <td>
                    <%= Html.TextBoxFor(model => model.FeederStandardXIII, new { @class = "textbox" })%>
                </td>
                <td>
                    <%= Html.TextBoxFor(model => model.FeederActualXIII, new { @class = "textbox" })%>
                </td>
                <td align="center">
                    <%=@Html.TextBoxFor(model => model.FeederPointXIII, new { @Value = "1", @readonly = "true" })%>
                </td>
            </tr>
            <tr>
                <td colspan="5">
                    Total Points คะแนนรวม
                </td>
                <td>
                    <input type="text" id="TotalPoint" readonly="readonly" value="0" />
                </td>
            </tr>
        </table>
    </div>
    <p>
        <input type="submit" class="buttonSummit" value="Next" />
    </p>
    <% } %>
    <div>
        <%= Html.ActionLink("Back to List", "Index") %>
    </div>
</asp:Content>
